//
//  minetopview.m
//  qiyunapp
//
//  Created by qiyun on 2018/7/14.
//  Copyright © 2018年 qiyun. All rights reserved.
//

#import "minetopview.h"
@interface minetopview ()
@property (nonatomic, strong) UIImageView *icon;
@property (nonatomic, strong) UILabel *username;
@property (nonatomic, strong) UILabel *acount;


@end
@implementation minetopview
{
  
    NSMutableArray*numarray;
   
}
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]){
        [self makeUI];
    }
    return self;
}

- (void)makeUI{
    NSArray*titlearray=@[@"今日开户",@"今日激活",@"今日消费",@"今日销量"];
    UILabel*num1=[[UILabel alloc]init];
    UILabel*num2=[[UILabel alloc]init];
    UILabel*num3=[[UILabel alloc]init];
    UILabel*num4=[[UILabel alloc]init];
    NSMutableArray*numarray=[NSMutableArray arrayWithObjects:num1,num2,num3,num4, nil];
    
    UIImageView*icon=[[UIImageView alloc]init];
    icon.image=IMAGE(@"");
    [self addSubview:icon];
    self.icon=icon;
    
    UILabel*username=[[UILabel alloc]init];
    username.text=@"足球操盘手";
    [self addSubview:username];
    self.username=username;
    
    UILabel*acount=[[UILabel alloc]init];
    acount.text=@"sj12345678";
    [self addSubview:acount];
    self.acount=acount;
    
//    for (int i =0; i<4; i++) {
//
//        UIView*view=[[UIView alloc]initWithFrame:CGRectMake(0, , <#CGFloat width#>, <#CGFloat height#>)];
//
//        UILabel*num=[[UILabel alloc]init];
//        num.text=@"0";
//        [view addSubview:num];
//        numarray[i]=num;
//
//        UILabel*title=[[UILabel alloc]init];
//        title.text=titlearray[i];
//        [view addSubview:title];
//
//    }
    
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.icon.frame=CGRectMake((SCREEN_W-60)/2, 30, 60, 60);
    self.username.frame=CGRectMake(0,CGRectGetMaxY( self.icon.frame)+10, 103, 19);
    self.acount.frame=CGRectMake(0,CGRectGetMaxY( self.username.frame)+12, 103, 19);
    
    
    
}
@end
